/*
 * @Author: your name
 * @Date: 2021-08-29 10:18:43
 * @LastEditTime: 2021-08-29 16:47:05
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue电商管理平台\vue-e-commerce\src\main-prod.js
 */

/*
 * @Author: your name
 * @Date: 2021-08-19 21:17:51
 * @LastEditTime: 2021-08-28 17:04:53
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue电商管理平台\vue-e-commerce\src\main.js
 */
import Vue from 'vue'
import './plugins/axios'
import App from './App.vue'
import router from './router'
// import './plugins/element.js'
// 树形ui组件
import TreeTable from 'vue-table-with-tree-grid'
// 富文本编辑器
import VueQuillEditor from 'vue-quill-editor'

import './assets/css/global.css'

Vue.config.productionTip = false

Vue.component('tree-table', TreeTable)

Vue.use(VueQuillEditor, /* { default global options } */)

Vue.filter('dateFormat', (originVal) => {
  const date = new Date(originVal*1000)
  const y = date.getFullYear()
  const m = (date.getMonth() + 1 + '').padStart(2, '0')
  const d = (date.getDate() + '').padStart(2, '0')
  
  const hh=(date.getHours()+'').padStart(2,'0')
  const mm=(date.getMinutes()+'').padStart(2,'0')
  const ss = (date.getSeconds() + '').padStart(2, '0')
  
  return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
